$(function(){
  var e = $('#main');
  return new Handsontable(e.get(0), {
    data: [
      ["Java", "1", "降", "-0.01%"],
      ["C", "2", "升", "+2.44%"],
      ["Python", "3", "升", "+1.41%"],
      ["C++", "4", "降", "-2.58%"],
      ["C#", "5", "升", "+2.07%"],
      ["Visual Basic.NET", "6", "降", "-1.17%"],
      ["JavaScript", "7", "降", "-0.85%"]
    ],
    colWidths:[35,35,35,35],
    stretchH:"all",//延申列的宽度
    //autoColumnSize:true;//自适应列大小
    contextMenu: true,//显示表头下拉菜单
    manualRowResize: true,//允许通过拖曳行表头/列表头来改变行列的大小
    manualColumnResize: true,
    rowHeaders: false,//显示表头
    colHeaders: ["语言名称", "排名", "升或降", "变化幅度"]
  })
})


var myChart = echarts.init(document.getElementById('main2'));
var option;

option = {
  title:{text:'JavaScript语言排名变化'},
  tooltip:{
    trigger: 'axis'
  },
  legend:{
    data:['排名']
  },
  xAxis: {
    type: 'category',
    data: ['2000', '2005', '2010', '2015', '2020',]

  },
  yAxis: {
    type: 'value'

  },
  series: [{
    data: [6, 9, 8, 8, 7],
    type: 'line'

  }]

};

option && myChart.setOption(option);
